<template>
    <div >
        <div v-for="(item,index) in menuList" :key="index">

            <el-submenu :index="item.path" v-if="item.children && item.children.length > 0 && item.children[0].menuType == 1">
                <template slot="title">
                    <i class="el-icon-setting"></i>
                    <span>{{item.menuName}}</span>
                </template>
                <tree-menu :menuList="item.children"></tree-menu>
            </el-submenu>
            
             <el-menu-item v-else-if="item.menuType == 1" :index="item.path">{{item.menuName}}</el-menu-item>
        </div>
    </div>

</template>

<script>
export default {
 name : "tree-menu", 
 data(){
  return {

  }
 },
 props : ["menuList"],
 components : {

 },
}
</script>


<style scoped>

</style>